package org.icy.plugins;

import java.lang.reflect.Method;

import org.icy.exceptions.IcySetupException;

public abstract class AbstractPlugin implements Plugin {

	@Override
	public void onMessage(String message, Object data) {
		try {
			Method method = this.getClass().getMethod("on"+message, Object.class);
			method.invoke(this, data);
		} catch (Exception ex) {
			
		}
	}

	@Override
	public void load() throws IcySetupException {}

	@Override
	public void unload() throws IcySetupException {}

	@Override
	public void activate() throws IcySetupException {}

	@Override
	public void deactivate() throws IcySetupException {}

}
